<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>判断登录是否成功</title>
</head>
<body>
    <script>
        let a =function (name,password){
            if(name=="mr"&&password=="mrsoft"){
                document.write("登录成功");
            }else{
                document.write("登录失败");
            }
        }
        a("mr","mrsoft");
    </script>
</body>
</html>